export const getUrlParams = (urlParts) => {

    var qs = urlParts.length <= 1 ? "" : urlParts[1];
    var urlParams = {},
        e,
        a = /\+/g, // Regex for replacing addition symbol with a space
        r = /([^&=]+)=?([^&]*)/g,
        d = function (s) {
            return decodeURIComponent(s.replace(a, " "));
        };
    do {
        e = r.exec(qs);
        if (e) {
            urlParams[d(e[1])] = d(e[2]);
        }
    } while (e);

    return urlParams;

};
